package com.zlsy.springbootdemo.decorator.rookietutorial;

/**
 * @author zhouliang
 * @date 2020/6/4 15:25
 */
public class DecoratorPatternDemo {
    public static void main(String[] args) {

        Shape circle = new Circle();
        ShapeDecorator redCircle = new RedShapeDecorator(new Circle());
        ShapeDecorator redRectangle = new RedShapeDecorator(new Rectangle());

        System.out.println("正常边框的圆");
        circle.draw();

        System.out.println("\n红色边框的圈");
        redCircle.draw();

        System.out.println("\n红色边框的矩形");
        redRectangle.draw();
    }
}
